/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class SmartRiceCooker {
    static categoryCode = '010050006';

    static categoryName = '智能电饭锅';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return SmartRiceCooker.categoryCode;
    }

    get categoryName() {
        return SmartRiceCooker.categoryName;
    }

    getAlarm(params) {
        return command({
            method: 'getAlarm',
            methodId: '新增接口01',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getChildLock(params) {
        return command({
            method: 'getChildLock',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCookingMode(params) {
        return command({
            method: 'getCookingMode',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCookingStatus(params) {
        return command({
            method: 'getCookingStatus',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCookingTaste(params) {
        return command({
            method: 'getCookingTaste',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentTemp(params) {
        return command({
            method: 'getCurrentTemp',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRemainingCookingTime(params) {
        return command({
            method: 'getRemainingCookingTime',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTotalCookingTime(params) {
        return command({
            method: 'getTotalCookingTime',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setChildLock(params) {
        return command({
            method: 'setChildLock',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setCookingMode(params) {
        return command({
            method: 'setCookingMode',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setCookingTaste(params) {
        return command({
            method: 'setCookingTaste',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'nan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default SmartRiceCooker;
